<template>
  <div class="root">
    <myHeader v-show="router"></myHeader>
    <!-- <button @click="gos">路由跳转;</button> -->
    <!-- <router-link to="/login">Go to Home</router-link> -->
    <router-view></router-view>
    <myFooter></myFooter>
  </div>
</template>

<script>
import myHeader from "./components/my-header/index.vue";
import myFooter from "./components/my-footer/index.vue";
import { onMounted } from "@vue/runtime-core";
import { useRoute, useRouter } from "vue-router";
export default {
  components: {
    myHeader,
    myFooter,
  },
  setup(props) {
    const route = useRoute();
    const router = useRouter();
    let gos = function () {
      router.push({
        name: "login",
      });
    };
    onMounted(() => {
      // console.log(router.currentRoute);
      // console.log(router.currentRoute["_value"]);
    });
    return {
      gos,
      router,
    };
  },
};
</script>

<style scoped>
.root {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  padding: 46 0 50;
}
</style>
